package com.zhentao.controller;

import com.zhentao.entity.user.GoodsInfo;
import com.zhentao.service.GoodSearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("good")
public class GoodSearchController {
    @Autowired
    private GoodSearchService goodSearchService;

    @RequestMapping("goodSearch")
    public List<GoodsInfo> goodSearch(String categoryName){
        List<GoodsInfo> list=goodSearchService.goodSearch(categoryName);
        return list;
    }
}
